home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1984 May / 1984-05.d64 / ski physics 2 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  50 lines

  1. 250 print"[147]":pokesc,152:poke36869,255
  2. 255 a=int(rnd(1)*3+1):b=int(rnd(1)*7+1):x=int(rnd(1)*26+5):y=int(rnd(1)*101+50)
  3. 260 ifa=1thend$="feet":tt$="seconds":v$="f/s"
  4. 265 ifa=2thend$="miles":tt$="hours":v$="mph"
  5. 270 ifa=3thend$="feet":tt$="minutes":v$="f/m"
  6. 280 onbgosub440,470,440,455,470,440,470
  7. 285 print:print:print:printtab(19)"[144][\":printtab(19)"]("
  8. 290 forn=19to15step-1:printtab(n)"(":nextn
  9. 295 printtab(12)"'''''":printtab(12)"'''''"
  10. 300 print"[156]'''''[158]  %%%%%'''''":print"[156]''''''''''''''''''''''  "
  11. 305 print"[145][145][145][145][145][145][145][145][145][145][145][145][145][145][145][145]"
  12. 310 z=7680+(9*22)+20:c=z+30720:v=36878:f2=36875
  13. 315 input"[144]     ";s$:s=val(s$):ifs=kthen360
  14. 330 pokev,15:print"  uh uh! sorry  "
  15. 335 form=230to190step-1:pokef2,m:fort=1to5:nextt:nextm
  16. 340 q=5:gosub480:pokev,0:forn=1to4:pokez,32:pokez+21,32:pokez+22,32:pokez+23,32
  17. 345 pokez+22,30:pokec+22,0:pokez+43,35:pokec+43,0:pokez+44,31:pokec+44,0
  18. 350 pokez+45,36:pokec+45,0:z=z+22:c=c+22:nextn
  19. 354 forn=0to4:pokez+20+n,38:pokec+20+n,7:nextn
  20. 355 poke36877,210:forl=15to0step-1:pokev,l:form=1to50:nextm:nextl:pp=1
  21. 356 poke36877,0:pokev,0:goto400
  22. 360 pokev,15:print" yep! thats right ":form=190to230:pokef2,m:fort=1to5:nextt:nextm
  23. 362 q=10:gosub480:pokev,0:forn=1to3:pokez,32:pokez+21,32:pokez+22,32:pokez+23,32
  24. 364 pokez+21,30:pokec+21,0:pokez+42,35:pokec+42,0:pokez+43,31:pokec+43,0
  25. 366 pokez+44,36:pokec+44,0:z=z+21:c=c+21:nextn
  26. 368 pokev,15:forl=148to220step.7:pokef2,l:nextl:pokev,0:fort=1to500:nextt:pp=2
  27. 400 print"[147]":pokesc,184
  28. 405 ifpp=1thenprintspc(134)"you lost this time"
  29. 407 ifpp=1thenprintspc(49)"better luck            next time"
  30. 410 ifpp=2thenprintspc(158)"you solved the        given  problem"
  31. 412 fort2=1to5000:next
  32. 415 d=5:goto250
  33. 440 k=int(y/x)
  34. 441 printspc(24)"[144]a skier went ";y:print"  ";d$
  35. 442 print"[144]  in ";x;"";tt$
  36. 445 print"[144]  what was his":print"[144]  velocity in ";v$:return
  37. 455 k=x*y:printspc(24)"[144]a skier went ";x:print"  ";v$:print"[144]  for ";y"";tt$
  38. 460 print"[144]  what was his":print"[144]  distance in ";"";d$:return
  39. 470 k=int(y/x)
  40. 471 printspc(24)"[144]a skier went ";y:print"  ";d$
  41. 472 print"[144]  at ";x;"";v$
  42. 475 print"[144]  how much time did":print"[144]  he ski in ";tt$:return
  43. 480 forn=1to5:pokez,32:pokez+1,32:pokez+22,32:pokez+21,27:pokec+21,0
  44. 482 pokez+22,28:pokec+22,0:pokez+43,29:pokec+43,0:z=z+21:c=c+21:nextn
  45. 484 pokev,0:z=z-21:pokez,32:pokez+1,32:pokez+22,32
  46. 486 z=7680+(14*22)+14:c=z+30720:pokez+1,32
  47. 488 forn=1toq:pokez,32:pokez+21,32:pokez+22,32:pokez+23,32
  48. 490 pokez-1,30:pokec-1,0:pokez+20,35:pokec+20,0:pokez+21,31:pokec+21,0
  49. 492 pokez+22,36:pokec+22,0:z=z-1:c=c-1:nextn:return
  50.